package com.mdlib.helper.ui.fragments.rush.money;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.ljlib.help.R;
import com.mdlib.helper.base.BaseAppFragment;
import com.mdlib.helper.model.entity.AccountDetails;
import com.mdlib.helper.ui.adapter.AccountDetailsAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;

/**
 * 作者：HQY on 16/11/30 10:34
 * 邮箱：hqy_xz@126.com
 */

public class AccountDetailsFragment extends BaseAppFragment {


    @Bind(R.id.rv_account_list)
    RecyclerView mRvAccountList;

    private AccountDetailsAdapter mAccountDetailsAdapter;

    private List<AccountDetails> accountDetailsList = new ArrayList<>();


    public static AccountDetailsFragment newInstance() {
        return new AccountDetailsFragment();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_account_details;
    }

    @Override
    protected void initView(View view, Bundle savedInstanceState) {
        initTopbar(true, getActivity().getResources().getString(R.string.balance_account_details), R.color.generic_view_bg);
        init();
    }


    public void init() {
        for (int i = 0; i < 10; i++) {
            AccountDetails accountDetails = new AccountDetails();
            accountDetails.setTitle("提现成功 ");
            accountDetailsList.add(accountDetails);
        }

        mAccountDetailsAdapter = new AccountDetailsAdapter(accountDetailsList);
        mRvAccountList.setLayoutManager(new LinearLayoutManager(getActivity()));
        mRvAccountList.setAdapter(mAccountDetailsAdapter);

    }
}
